inherited sprSuppliers: TsprSuppliers
  Left = 432
  Top = 201
  HelpContext = 1157
  Caption = #1055#1086#1089#1090#1072#1074#1097#1080#1082#1080
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel2: TPanel
    Top = 69
    Height = 485
    inherited PageControl1: TPageControl
      Height = 485
      inherited tsTab: TTabSheet
        inherited GroupBox3: TGroupBox
          Height = 457
          inherited dbgRefer: TDBGridEh
            Height = 440
            Columns = <
              item
                EditButtons = <>
                FieldName = 'ID'
                Footers = <>
              end
              item
                EditButtons = <>
                FieldName = 'NAME'
                Footers = <>
                Width = 229
              end
              item
                EditButtons = <>
                FieldName = 'SHORTNAME'
                Footers = <>
                Width = 137
              end
              item
                EditButtons = <>
                FieldName = 'CODE'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'SUPPLIER'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'METERPOLIT'
                Footers = <>
                Visible = False
                Width = 87
              end
              item
                EditButtons = <>
                FieldName = 'LCODE'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'RADDRESS'
                Footers = <>
                Width = 197
              end
              item
                EditButtons = <>
                FieldName = 'JADDRESS'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'PHONE'
                Footers = <>
                Width = 97
              end
              item
                EditButtons = <>
                FieldName = 'INN'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'OKONH'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'OKPO'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'BANKORG'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'BIK'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'RS'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'KRS'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'ADMIN'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'GENBUHGALTER'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'MENABONENTS'
                Footers = <>
                Visible = False
              end
              item
                EditButtons = <>
                FieldName = 'ADMINNAME'
                Footers = <>
                Visible = False
              end>
          end
        end
      end
      inherited tsForm: TTabSheet
        inherited GroupBox2: TGroupBox
          Top = 0
          Width = 784
          Height = 457
          Align = alClient
          object Panel1: TPanel [0]
            Left = 2
            Top = 15
            Width = 780
            Height = 226
            Align = alTop
            BevelOuter = bvNone
            TabOrder = 0
            object Label1: TLabel
              Left = 446
              Top = 3
              Width = 17
              Height = 13
              Alignment = taRightJustify
              Caption = #1048#1044
            end
            object Label2: TLabel
              Left = 18
              Top = 43
              Width = 120
              Height = 13
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1050#1086#1088#1086#1090#1082#1086#1077' '#1085#1072#1079#1074#1072#1085#1080#1077
            end
            object Label3: TLabel
              Left = 118
              Top = 63
              Width = 19
              Height = 13
              Alignment = taRightJustify
              Caption = #1050#1086#1076
            end
            object Label5: TLabel
              Left = 58
              Top = 83
              Width = 79
              Height = 13
              Alignment = taRightJustify
              Caption = #1057#1083#1091#1078#1077#1073#1085#1099#1081' '#1082#1086#1076
            end
            object Label6: TLabel
              Left = 382
              Top = 23
              Width = 83
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              Caption = #1055#1086#1095#1090#1086#1074#1099#1081' '#1072#1076#1088#1077#1089
            end
            object Label7: TLabel
              Left = 18
              Top = 23
              Width = 120
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1053#1072#1079#1074#1072#1085#1080#1077
            end
            object Label8: TLabel
              Left = 420
              Top = 63
              Width = 45
              Height = 13
              Alignment = taRightJustify
              Caption = #1058#1077#1083#1077#1092#1086#1085
            end
            object Label9: TLabel
              Left = 441
              Top = 83
              Width = 24
              Height = 13
              Alignment = taRightJustify
              Caption = #1048#1053#1053
            end
            object Label11: TLabel
              Left = 434
              Top = 43
              Width = 31
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              Caption = #1040#1076#1088#1077#1089
            end
            object Label12: TLabel
              Left = 434
              Top = 123
              Width = 31
              Height = 13
              Alignment = taRightJustify
              Caption = #1054#1050#1055#1054
            end
            object Label13: TLabel
              Left = 440
              Top = 143
              Width = 25
              Height = 13
              Alignment = taRightJustify
              Caption = #1041#1072#1085#1082
            end
            object Label14: TLabel
              Left = 427
              Top = 103
              Width = 38
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              Caption = #1054#1050#1054#1053#1061
            end
            object Label15: TLabel
              Left = 443
              Top = 163
              Width = 22
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              Caption = #1041#1048#1050
            end
            object Label16: TLabel
              Left = 415
              Top = 203
              Width = 50
              Height = 13
              Alignment = taRightJustify
              Caption = #1050#1086#1088#1088'.'#1089#1095#1077#1090
            end
            object Label17: TLabel
              Left = 66
              Top = 123
              Width = 71
              Height = 13
              Alignment = taRightJustify
              Caption = #1056#1091#1082#1086#1074#1086#1076#1080#1090#1077#1083#1100
            end
            object Label18: TLabel
              Left = 385
              Top = 183
              Width = 80
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              Caption = #1056#1072#1089#1095#1077#1090#1085#1099#1081' '#1089#1095#1077#1090
            end
            object Label19: TLabel
              Left = 14
              Top = 183
              Width = 123
              Height = 13
              Alignment = taRightJustify
              Caption = #1053#1072#1095#1072#1083#1100#1085#1080#1082' '#1072#1073#1086#1085'. '#1086#1090#1076#1077#1083#1072
            end
            object Label20: TLabel
              Left = 6
              Top = 143
              Width = 131
              Height = 13
              Alignment = taRightJustify
              Caption = #1044#1086#1083#1078#1085#1086#1089#1090#1100' '#1088#1091#1082#1086#1074#1086#1076#1080#1090#1077#1083#1103
            end
            object Label21: TLabel
              Left = 72
              Top = 163
              Width = 65
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              Caption = #1043#1083'.'#1073#1091#1093#1075#1072#1083#1090#1077#1088
            end
            object Label22: TLabel
              Left = 18
              Top = 203
              Width = 119
              Height = 13
              Alignment = taRightJustify
              Caption = #1044#1072#1090#1072' '#1079#1072#1082#1088#1099#1090#1080#1103' '#1086#1088#1075'-'#1094#1080#1080
            end
            object Label23: TLabel
              Left = 8
              Top = 3
              Width = 130
              Height = 13
              Hint = #1082#1086#1076' '#1076#1083#1103' '#1074#1085#1077#1096#1085#1080#1093' '#1082#1083#1102#1095#1077#1081
              Alignment = taRightJustify
              AutoSize = False
              Caption = #1043#1086#1083#1086#1074#1085#1072#1103' '#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
            end
            object DBEditEh1: TDBEditEh
              Left = 473
              Top = 0
              Width = 57
              Height = 19
              AlwaysShowBorder = True
              Color = clInactiveCaptionText
              DataField = 'ID'
              DataSource = dscRefer
              EditButtons = <>
              Enabled = False
              Flat = True
              ReadOnly = True
              TabOrder = 0
              Visible = True
            end
            object DBEditEh5: TDBEditEh
              Left = 147
              Top = 80
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'LCODE'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 4
              Visible = True
            end
            object DBEditEh6: TDBEditEh
              Left = 473
              Top = 20
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'RADDRESS'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 10
              Visible = True
            end
            object DBEditEh2: TDBEditEh
              Left = 147
              Top = 40
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'SHORTNAME'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 2
              Visible = True
            end
            object DBEditEh3: TDBEditEh
              Left = 147
              Top = 60
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'CODE'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 3
              Visible = True
            end
            object DBEditEh7: TDBEditEh
              Left = 147
              Top = 20
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'NAME'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 1
              Visible = True
            end
            object DBEditEh4: TDBEditEh
              Left = 473
              Top = 60
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'PHONE'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 12
              Visible = True
            end
            object DBEditEh8: TDBEditEh
              Left = 473
              Top = 80
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'INN'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 13
              Visible = True
            end
            object DBEditEh9: TDBEditEh
              Left = 473
              Top = 40
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'JADDRESS'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 11
              Visible = True
            end
            object DBEditEh10: TDBEditEh
              Left = 473
              Top = 120
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'OKPO'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 15
              Visible = True
            end
            object DBEditEh11: TDBEditEh
              Left = 473
              Top = 140
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'BANKORG'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 16
              Visible = True
            end
            object DBEditEh12: TDBEditEh
              Left = 473
              Top = 100
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'OKONH'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 14
              Visible = True
            end
            object DBEditEh13: TDBEditEh
              Left = 473
              Top = 160
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'BIK'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 17
              Visible = True
            end
            object DBEditEh14: TDBEditEh
              Left = 473
              Top = 200
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'KRS'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 19
              Visible = True
            end
            object DBEditEh15: TDBEditEh
              Left = 147
              Top = 120
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'ADMIN'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 6
              Visible = True
            end
            object DBEditEh16: TDBEditEh
              Left = 473
              Top = 180
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'RS'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 18
              Visible = True
            end
            object DBEditEh17: TDBEditEh
              Left = 147
              Top = 180
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'MENABONENTS'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 9
              Visible = True
            end
            object DBEditEh18: TDBEditEh
              Left = 147
              Top = 140
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'ADMINNAME'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 7
              Visible = True
            end
            object DBEditEh19: TDBEditEh
              Left = 147
              Top = 160
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'GENBUHGALTER'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              TabOrder = 8
              Visible = True
            end
            object dbcbSupplier: TDBCheckBoxEh
              Left = 79
              Top = 101
              Width = 81
              Height = 17
              Alignment = taLeftJustify
              AlwaysShowBorder = True
              Caption = #1055#1086#1089#1090#1072#1074#1097#1080#1082'   '
              DataField = 'IS_SUPPLIER'
              DataSource = dscRefer
              Flat = True
              TabOrder = 5
              ValueChecked = '1'
              ValueUnchecked = '0'
            end
            object DBCheckBoxEh1: TDBCheckBoxEh
              Left = 183
              Top = 101
              Width = 146
              Height = 17
              Alignment = taLeftJustify
              AlwaysShowBorder = True
              Caption = #1046#1080#1083#1080#1097#1085#1072#1103' '#1086#1088#1075#1072#1085#1080#1079#1072#1094#1080#1103
              DataField = 'IS_UK'
              DataSource = dscRefer
              Flat = True
              TabOrder = 20
              ValueChecked = '1'
              ValueUnchecked = '0'
            end
            object DBDateTimeEditEh1: TDBDateTimeEditEh
              Left = 147
              Top = 200
              Width = 121
              Height = 19
              AlwaysShowBorder = True
              DataField = 'EDATE'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              Kind = dtkDateEh
              TabOrder = 21
              Visible = True
            end
            object DBCheckBoxEh2: TDBCheckBoxEh
              Left = 549
              Top = 1
              Width = 141
              Height = 17
              Alignment = taLeftJustify
              AlwaysShowBorder = True
              Caption = #1056#1072#1089#1095#1077#1090#1085#1099#1081' '#1089#1095#1077#1090' '#1079#1072#1082#1088#1099#1090'   '
              DataField = 'CLOSED_RS'
              DataSource = dscRefer
              Flat = True
              TabOrder = 22
              ValueChecked = '1'
              ValueUnchecked = '0'
            end
            object lcbParent: TDBLookupComboboxEh
              Left = 147
              Top = 0
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'PARENTID'
              DataSource = dscRefer
              DropDownBox.SpecRow.CellsText = ' ---'
              DropDownBox.SpecRow.Value = '0'
              DropDownBox.SpecRow.Visible = True
              EditButtons = <>
              Flat = True
              KeyField = 'ID'
              ListField = 'SHORTNAME'
              ListSource = dscParentList
              TabOrder = 23
              Visible = True
            end
          end
          inherited pnlButtons: TPanel
            Top = 424
            Width = 780
            TabOrder = 1
            DesignSize = (
              780
              31)
            inherited SpeedButton1: TSpeedButton
              Left = 580
            end
            inherited SpeedButton2: TSpeedButton
              Left = 682
            end
          end
          object gbDeps: TGroupBox
            Left = 2
            Top = 241
            Width = 780
            Height = 183
            Align = alClient
            Caption = ' '#1059#1095#1072#1089#1090#1082#1080' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1072' '
            TabOrder = 2
            object Label4: TLabel
              Left = 463
              Top = 155
              Width = 92
              Height = 13
              Alignment = taRightJustify
              Caption = #1059#1095#1077#1090#1085#1072#1103' '#1087#1086#1083#1080#1090#1080#1082#1072
            end
            object DBComboBoxEh1: TDBComboBoxEh
              Left = 558
              Top = 152
              Width = 217
              Height = 19
              AlwaysShowBorder = True
              DataField = 'METERPOLIT'
              DataSource = dscRefer
              EditButtons = <>
              Flat = True
              Items.Strings = (
                #1091#1095#1077#1090' '#1086#1090' '#1079#1072#1103#1074#1083#1077#1085#1085#1086#1075#1086' '#1087#1086#1090#1088#1077#1073#1083#1077#1085#1080#1103
                #1091#1095#1077#1090' '#1086#1090' '#1086#1087#1083#1072#1095#1077#1085#1085#1086#1075#1086' '#1087#1086#1090#1088#1077#1073#1083#1077#1085#1080#1103
                #1091#1095#1077#1090' '#1085#1077' '#1074#1077#1076#1077#1090#1089#1103' '#1087#1086' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1091)
              KeyItems.Strings = (
                '1'
                '-1'
                '0')
              TabOrder = 0
              Visible = True
            end
            object ToolBar2: TToolBar
              Left = 2
              Top = 15
              Width = 776
              Height = 24
              ButtonHeight = 23
              Caption = 'ToolBar2'
              EdgeBorders = []
              Flat = True
              Images = MAIN.ImageList
              TabOrder = 1
              object ToolButton12: TToolButton
                Left = 0
                Top = 0
                Action = aNewDept
              end
              object ToolButton13: TToolButton
                Left = 23
                Top = 0
                Action = aEditDept
              end
              object ToolButton15: TToolButton
                Left = 46
                Top = 0
                Width = 8
                Caption = 'ToolButton15'
                ImageIndex = 3
                Style = tbsSeparator
              end
              object ToolButton14: TToolButton
                Left = 54
                Top = 0
                Action = ADelDept
              end
            end
            object dbgDeps: TDBGridEh
              Left = 2
              Top = 39
              Width = 776
              Height = 142
              Align = alClient
              DataGrouping.GroupLevels = <>
              DataSource = dscDepts
              EditActions = [geaCutEh, geaCopyEh, geaPasteEh, geaDeleteEh, geaSelectAllEh]
              Flat = True
              FooterColor = clWindow
              FooterFont.Charset = DEFAULT_CHARSET
              FooterFont.Color = clWindowText
              FooterFont.Height = -11
              FooterFont.Name = 'MS Sans Serif'
              FooterFont.Style = []
              Options = [dgEditing, dgTitles, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit]
              OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghDblClickOptimizeColWidth, dghDialogFind, dghColumnResize, dghColumnMove]
              RowDetailPanel.Color = clBtnFace
              TabOrder = 2
              TitleFont.Charset = DEFAULT_CHARSET
              TitleFont.Color = clWindowText
              TitleFont.Height = -11
              TitleFont.Name = 'MS Sans Serif'
              TitleFont.Style = []
              UseMultiTitle = True
              VTitleMargin = 5
              Columns = <
                item
                  EditButtons = <>
                  FieldName = 'ID'
                  Footers = <>
                end
                item
                  EditButtons = <>
                  FieldName = 'NAME'
                  Footers = <>
                end>
              object RowDetailData: TRowDetailPanelControlEh
              end
            end
          end
        end
      end
    end
  end
  inherited GroupBox1: TGroupBox
    Height = 44
    object Label10: TLabel
      Left = 20
      Top = 18
      Width = 50
      Height = 13
      Caption = #1053#1072#1079#1074#1072#1085#1080#1077
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
    end
    object eNameSearch: TDBEditEh
      Left = 80
      Top = 15
      Width = 189
      Height = 19
      AlwaysShowBorder = True
      EditButtons = <>
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      Flat = True
      ParentFont = False
      TabOrder = 0
      Visible = True
      OnChange = eNameSearchChange
    end
    object cbShowAllOrgs: TDBCheckBoxEh
      Left = 284
      Top = 16
      Width = 181
      Height = 17
      AlwaysShowBorder = True
      Caption = #1055#1086#1082#1072#1079#1072#1090#1100' '#1090#1086#1083#1100#1082#1086' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1086#1074
      Checked = True
      Flat = True
      Font.Charset = DEFAULT_CHARSET
      Font.Color = clWindowText
      Font.Height = -11
      Font.Name = 'MS Sans Serif'
      Font.Style = []
      ParentFont = False
      State = cbChecked
      TabOrder = 1
      ValueChecked = 'True'
      ValueUnchecked = 'False'
      OnClick = eNameSearchChange
    end
  end
  inherited shblActionList: TActionList
    object aNewDept: TAction
      Caption = 'aNewDept'
      ImageIndex = 9
      Visible = False
      OnExecute = aNewDeptExecute
    end
    object aEditDept: TAction
      Caption = 'aEditDept'
      ImageIndex = 5
      Visible = False
      OnExecute = aEditDeptExecute
    end
    object ADelDept: TAction
      Caption = 'ADelDept'
      ImageIndex = 2
      OnExecute = ADelDeptExecute
    end
  end
  inherited dsRefer: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE USERORG'
      'SET '
      '    SHORTNAME = :SHORTNAME,'
      '    NAME = :NAME,'
      '    CODE = :CODE,'
      '    METERPOLIT = :METERPOLIT,'
      '    LCODE = :LCODE,'
      '    RADDRESS = :RADDRESS,'
      '    JADDRESS = :JADDRESS,'
      '    PHONE = :PHONE,'
      '    INN = :INN,'
      '    OKONH = :OKONH,'
      '    BIK = :BIK,'
      '    OKPO = :OKPO,'
      '    RS = :RS,'
      '    KRS = :KRS,'
      '    GENBUHGALTER = :GENBUHGALTER,'
      '    MENABONENTS = :MENABONENTS,'
      '    ADMINNAME = :ADMINNAME,'
      '    BANKORG = :BANKORG,'
      '    "ADMIN" = :"ADMIN",'
      '    SUPPLIER = bitand(:IS_SUPPLIER, 1) + bitand(:IS_UK*2, 2),'
      '    EDATE = :EDATE,'
      '    CLOSED_RS = :CLOSED_RS,'
      '    PARENTID = :PARENTID'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    USERORG'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO USERORG('
      '    SHORTNAME,'
      '    NAME,'
      '    CODE,'
      '    METERPOLIT,'
      '    LCODE,'
      '    RADDRESS,'
      '    JADDRESS,'
      '    PHONE,'
      '    INN,'
      '    OKONH,'
      '    BIK,'
      '    OKPO,'
      '    RS,'
      '    KRS,'
      '    GENBUHGALTER,'
      '    MENABONENTS,'
      '    ADMINNAME,'
      '    BANKORG,'
      '    "ADMIN",'
      '    SUPPLIER,'
      '    EDATE,'
      '    CLOSED_RS,'
      '    PARENTID'
      ')'
      'VALUES('
      '    :SHORTNAME,'
      '    :NAME,'
      '    :CODE,'
      '    :METERPOLIT,'
      '    :LCODE,'
      '    :RADDRESS,'
      '    :JADDRESS,'
      '    :PHONE,'
      '    :INN,'
      '    :OKONH,'
      '    :BIK,'
      '    :OKPO,'
      '    :RS,'
      '    :KRS,'
      '    :GENBUHGALTER,'
      '    :MENABONENTS,'
      '    :ADMINNAME,'
      '    :BANKORG,'
      '    :"ADMIN",'
      '    bitand(:IS_SUPPLIER, 1) + bitand(:IS_UK*2, 2),'
      '    :EDATE,'
      '    :CLOSED_RS,'
      '    :PARENTID'
      ')'
      'returning id')
    RefreshSQL.Strings = (
      'select u.ID,'
      'u.SHORTNAME,'
      'u.NAME,'
      'u.CODE,'
      'u.SUPPLIER,'
      'getbit(u.SUPPLIER,0) as IS_SUPPLIER,'
      'getbit(u.SUPPLIER,1) as IS_UK,'
      'u.METERPOLIT,'
      'u.LCODE,'
      'u.RADDRESS,'
      'u.JADDRESS,'
      'u.PHONE,'
      'u.INN,'
      'u.OKONH,'
      'u.BIK,'
      'u.OKPO,'
      'u.RS,'
      'u.KRS,'
      'u."ADMIN",'
      'u.GENBUHGALTER,'
      'u.MENABONENTS,'
      'u.ADMINNAME,'
      'u.BANKORG,'
      'u.EDATE,'
      'u.CLOSED_RS,'
      'u.PARENTID'
      'from userorg u'
      'where U.ID = :OLD_ID'
      '    ')
    SelectSQL.Strings = (
      'select u.ID,'
      'u.SHORTNAME,'
      'u.NAME,'
      'u.CODE,'
      'u.SUPPLIER,'
      'getbit(u.SUPPLIER,0) as IS_SUPPLIER,'
      'getbit(u.SUPPLIER,1) as IS_UK,'
      'u.METERPOLIT,'
      'u.LCODE,'
      'u.RADDRESS,'
      'u.JADDRESS,'
      'u.PHONE,'
      'u.INN,'
      'u.OKONH,'
      'u.BIK,'
      'u.OKPO,'
      'u.RS,'
      'u.KRS,'
      'u."ADMIN",'
      'u.GENBUHGALTER,'
      'u.MENABONENTS,'
      'u.ADMINNAME,'
      'u.BANKORG,'
      'u.EDATE,'
      'u.CLOSED_RS,'
      'u.parentid'
      'from userorg u'
      'where 1=1 ')
    UpdateTransaction = trRefer
    object dsReferID: TFIBIntegerField
      DisplayLabel = #1048#1044
      FieldName = 'ID'
    end
    object dsReferNAME: TFIBStringField
      DisplayLabel = #1053#1072#1079#1074#1072#1085#1080#1077
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
    object dsReferSHORTNAME: TFIBStringField
      DisplayLabel = #1050#1086#1088#1086#1090#1082#1086#1077' '#1085#1072#1079#1074#1072#1085#1080#1077
      FieldName = 'SHORTNAME'
      Size = 30
      EmptyStrToNull = True
    end
    object dsReferCODE: TFIBStringField
      DisplayLabel = #1050#1086#1076' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1072'('#1091#1085#1080#1082'.)'
      FieldName = 'CODE'
      Size = 16
      EmptyStrToNull = True
    end
    object dsReferMETERPOLIT: TFIBSmallIntField
      DisplayLabel = #1059#1095#1077#1090#1085#1072#1103' '#1087#1086#1083#1080#1090#1080#1082#1072
      FieldName = 'METERPOLIT'
      MaxValue = 1
      MinValue = -1
    end
    object dsReferLCODE: TFIBStringField
      DisplayLabel = #1057#1083#1091#1078#1077#1073#1085'.'#1082#1086#1076
      FieldName = 'LCODE'
      Size = 3
      EmptyStrToNull = True
    end
    object dsReferRADDRESS: TFIBStringField
      DisplayLabel = #1055#1086#1095#1090#1086#1074#1099#1081' '#1072#1076#1088#1077#1089
      FieldName = 'RADDRESS'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferJADDRESS: TFIBStringField
      DisplayLabel = #1040#1076#1088#1077#1089
      FieldName = 'JADDRESS'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferPHONE: TFIBStringField
      DisplayLabel = #1058#1077#1083#1077#1092#1086#1085
      FieldName = 'PHONE'
      EmptyStrToNull = True
    end
    object dsReferINN: TFIBStringField
      DisplayLabel = #1048#1053#1053
      FieldName = 'INN'
      Size = 12
      EmptyStrToNull = True
    end
    object dsReferOKONH: TFIBStringField
      DisplayLabel = #1054#1050#1054#1053#1061
      FieldName = 'OKONH'
      EmptyStrToNull = True
    end
    object dsReferOKPO: TFIBStringField
      DisplayLabel = #1054#1050#1055#1054
      FieldName = 'OKPO'
      EmptyStrToNull = True
    end
    object dsReferBANKORG: TFIBStringField
      DisplayLabel = #1041#1072#1085#1082
      FieldName = 'BANKORG'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferBIK: TFIBStringField
      DisplayLabel = #1041#1048#1050
      FieldName = 'BIK'
      EmptyStrToNull = True
    end
    object dsReferRS: TFIBStringField
      DisplayLabel = #1056#1072#1089#1095'.'#1089#1095#1077#1090
      FieldName = 'RS'
      EmptyStrToNull = True
    end
    object dsReferKRS: TFIBStringField
      DisplayLabel = #1050#1086#1088'.'#1089#1095#1077#1090
      FieldName = 'KRS'
      EmptyStrToNull = True
    end
    object dsReferADMIN: TFIBStringField
      DisplayLabel = #1060#1048#1054' '#1088#1091#1082#1086#1074#1086#1076#1080#1090#1077#1083#1103
      FieldName = 'ADMIN'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferGENBUHGALTER: TFIBStringField
      DisplayLabel = #1043#1083'.'#1073#1091#1093#1075#1072#1083#1090#1077#1088
      FieldName = 'GENBUHGALTER'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferMENABONENTS: TFIBStringField
      DisplayLabel = #1053#1072#1095'.'#1072#1073#1086#1085#1086#1090#1076#1077#1083#1072
      FieldName = 'MENABONENTS'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferADMINNAME: TFIBStringField
      DisplayLabel = #1044#1086#1083#1078#1085#1086#1089#1090#1100' '#1088#1091#1082#1086#1074#1086#1076#1080#1090#1077#1083#1103
      FieldName = 'ADMINNAME'
      Size = 120
      EmptyStrToNull = True
    end
    object dsReferIS_SUPPLIER: TFIBIntegerField
      FieldName = 'IS_SUPPLIER'
    end
    object dsReferSUPPLIER: TFIBSmallIntField
      FieldName = 'SUPPLIER'
    end
    object dsReferIS_UK: TFIBIntegerField
      FieldName = 'IS_UK'
    end
    object dsReferEDATE: TFIBDateField
      FieldName = 'EDATE'
    end
    object dsReferCLOSED_RS: TFIBSmallIntField
      FieldName = 'CLOSED_RS'
    end
    object dsReferPARENTID: TFIBIntegerField
      FieldName = 'PARENTID'
    end
  end
  inherited trRefer: TpFIBTransaction
    Left = 44
    Top = 156
  end
  inherited PropStorage: TPropStorageEh
    Section = 'sprSuppliers'
  end
  object dsDepts: TpFIBDataSet
    UpdateSQL.Strings = (
      'UPDATE RSUPPLIER_DEPS'
      'SET '
      '    NAME = :NAME'
      'WHERE'
      '    ID = :OLD_ID'
      '    ')
    DeleteSQL.Strings = (
      'DELETE FROM'
      '    RSUPPLIER_DEPS'
      'WHERE'
      '        ID = :OLD_ID'
      '    ')
    InsertSQL.Strings = (
      'INSERT INTO RSUPPLIER_DEPS('
      '    SUPPLIER_ID,'
      '    NAME'
      ')'
      'VALUES('
      '    :SUPPLIER_ID,'
      '    :NAME'
      ')'
      'returning id')
    RefreshSQL.Strings = (
      'select rsd.* from RSUPPLIER_DEPS rsd'
      'where(  rsd.supplier_id = :supplier_id'
      '     ) and (     RSD.ID = :OLD_ID'
      '     )'
      '    ')
    SelectSQL.Strings = (
      'select rsd.* from RSUPPLIER_DEPS rsd'
      'where rsd.supplier_id = :id')
    BeforePost = dsDeptsBeforePost
    Transaction = trLists
    Database = MAINDM.pMainDatabase
    UpdateTransaction = trRefer
    DataSource = dscRefer
    Left = 318
    Top = 440
    WaitEndMasterScroll = True
    dcForceOpen = True
    oFetchAll = True
    object dsDeptsID: TFIBIntegerField
      DisplayLabel = #1048#1044
      FieldName = 'ID'
      ReadOnly = True
    end
    object dsDeptsNAME: TFIBStringField
      DisplayLabel = #1053#1072#1079#1074#1072#1085#1080#1077' '#1091#1095#1072#1089#1090#1082#1072
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
    object dsDeptsSUPPLIER_ID: TFIBIntegerField
      FieldName = 'SUPPLIER_ID'
      Visible = False
    end
  end
  object dscDepts: TDataSource
    DataSet = dsDepts
    Left = 382
    Top = 444
  end
  object dsParentList: TpFIBDataSet
    SelectSQL.Strings = (
      'select u.id, u.shortname from userorg u'
      '  left join proc_orgs_get_childs (:id) p on p.rchild_id = u.id'
      'where u.id <> :id'
      '  and p.rchild_id is null'
      '  and u.closed_rs = 0'
      '  and u.id > 0'
      '  and (u.edate is null or u.edate >= current_date)')
    Transaction = trLists
    Database = MAINDM.pMainDatabase
    UpdateTransaction = trRefer
    DataSource = dscRefer
    Left = 176
    Top = 96
    WaitEndMasterScroll = True
    dcForceOpen = True
    oRefreshAfterPost = False
    oRefreshAfterDelete = True
    oRefreshDeletedRecord = True
    oFetchAll = True
    object dsParentListID: TFIBIntegerField
      FieldName = 'ID'
    end
    object dsParentListSHORTNAME: TFIBStringField
      FieldName = 'SHORTNAME'
      Size = 30
      EmptyStrToNull = True
    end
  end
  object dscParentList: TDataSource
    DataSet = dsParentList
    Left = 208
    Top = 96
  end
end
